﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:PhoneApp6" 
    x:Class="PhoneApp6.Page1"
     
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded">

    
	<phone:PhoneApplicationPage.Resources>
		<local:dls x:Key="dlsDataSource" d:IsDataSource="True"/>
	</phone:PhoneApplicationPage.Resources>

    
    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.feature.search.rest.png" Text="浏览器" Click="brow" />
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.save.rest.png" Text="全部添加" Click="ApplicationBarIconButton_Click" />
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.refresh.rest.png" Text="从云端刷新" Click="ApplicationBarIconButton_Click_2" />
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.upload.rest.png" Text="本地加载" Click="ApplicationBarIconButton_Click_1" />
         <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="设置" Click="ApplicationBarMenuItem_Click" />
                </shell:ApplicationBar.MenuItems>
		</shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
    <Grid x:Name="LayoutRoot" Margin="0,8,0,0" DataContext="{Binding Source={StaticResource dlsDataSource}}">
    	<Grid.Background>
    		<ImageBrush Stretch="Fill" ImageSource="20119281531811.jpg"/>
    	</Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="821"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel 包含应用程序的名称和页标题-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="8,52,4,21">
            <ListBox Margin="0,0,8,0" Height="748" x:Name="lst" ItemsSource="{Binding Mode=OneWay}" >
                <ListBox.Resources>
                    <DataTemplate x:Key="DataTemplate1">
                        <Border BorderBrush="Black" BorderThickness="3"  Width="480" CornerRadius="10" Background="#FF1A71A9"  >
                            <StackPanel Margin="0,5,0,0">
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Margin="8,0,0,0" >
                                    <Image Height="100" Width="71" Source="/Images/appbar.favs.addto.rest.png" Tag="{Binding dlu}" MouseLeftButtonDown="Image_MouseLeftButtonDown_1" />
                                    <TextBlock TextWrapping="Wrap" Text="{Binding no}" Width="68"/>
                                    <TextBlock TextWrapping="Wrap" Text="{Binding dln}" Width="232"/>
                                    <Button Height="98" Width="96" Content="-&gt;" FontSize="48" FontWeight="Bold" Click="extn" BorderBrush="{StaticResource PhoneAccentBrush}" Foreground="{StaticResource PhoneForegroundBrush}" />
                                </StackPanel>
                                <StackPanel x:Name="skp" Width="474" Visibility="Collapsed" >
                                    <TextBlock TextWrapping="Wrap" Text="{Binding dlx}"/>
                                    <TextBlock TextWrapping="Wrap" Text="{Binding dlu}"/>
                                </StackPanel>

                            </StackPanel>

                        </Border>
                    </DataTemplate>
                </ListBox.Resources>
                <ListBox.ItemTemplate>
                    <StaticResource ResourceKey="DataTemplate1"/>
                </ListBox.ItemTemplate>
            </ListBox>
        </StackPanel>
        <HyperlinkButton Content="点击获取" VerticalAlignment="Top" Margin="263,12,0,0" Height="26" Click="HyperlinkButton_Click" HorizontalAlignment="Left" Width="176" Foreground="#FF0C0B0B" />
        <TextBlock x:Name="ApplicationTitle" Text="迅雷离线资源列表" Style="{StaticResource PhoneTextNormalStyle}" HorizontalAlignment="Left" Margin="30,11,0,0" Width="168" VerticalAlignment="Top" Foreground="#FF100F0F"/>
        <!--ContentPanel - 在此处放置其他内容-->
    </Grid>
</phone:PhoneApplicationPage>
